<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script src="../jq/jquery-1.12.4.js"></script>
	<script>
		$(function(){
			$("#a").click(function(){$(":checkbox").attr("checked",(this).attr("checked"));})
			
		});
	</script>
	<body>
		<form action="#" method="post">
		1<input type="checkbox" name="购物车"  value="呵呵" />
		2<input type="checkbox" name="购物车"  value="呵呵" />
		3<input type="checkbox" name="购物车"  value="呵呵" /></form>
		全选<input type="button" name="购物车"  value="全选" id="a"/>
	</body>
</html>
